import axios from 'axios'
import request from './request';

const API_URL =  "http://localhost:8080/app/rooms"

export const getHotelRooms =(hotelId)=>{
    return axios.get(`${API_URL}/hotelId/${hotelId}`)
}

// 实现调换房型的API调用逻辑
export function changeRoomType(params) {
  return axios.post(`${API_URL}/change-type`, params);
}

// 添加新的可用房间接口
export function getAvailableRooms(params) {
  // 根据实际接口路径调整，params可能包含hotelId、日期等参数
  return axios.get(`${API_URL}/available-room-types`, { params });
}